<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'json.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  <script type="text/javascript" src="${pageContext.request.contextPath }/js/jquery-1.11.3.min.js"></script>

  </head>
  
  <body>
  <div id="objectArrayDiv"></div>
    <script type="text/javascript">
  	var user=[{"id":1,"name":"admin","pwd":123},{"id":2,"name":"admin1","pwd":1234},
  	          {"id":3,"name":"admin2","pwd":12345},{"id":4,"name":"admin3","pwd":123456}];
 // var $table=$("<table border='1'></table>").append("<tr><td>ID</td><td>用户名</td><td>密码</td></tr>").appendTo($("#objectArrayDiv"));
  $(user).each(function(){
	  $("#objectArrayDiv").append("<tr><td>"+this.id+"</td><td>"+this.name+"</td><td>"+this.pwd+"</td><td>");
  });
  
  </script>
  </body>
</html>
